//
//  NSString+Additions.h
//  GomeMarketingClient
//
//  Created by Kelly xu on 2017/1/6.
//  Copyright © 2017年 GomeFinance. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Additions){

}
//字符串转JSON对象
- (id)JSONObject;
//年月日字符串取年、月、日
- (NSString*)year;
- (NSString*)month;
- (NSString*)day;
//去空格
- (NSString *)stringByTrim;

// 字符长度
- (int)charLength;

/**
 每隔N个字符中间插入一个空格

 @param string 要处理的字符串
 @param frequency 隔N个字符就中间插入一个空格
 @param prefixString 字符串前缀
 @return 处理后的字符串
 */
- (NSString *)conversionStringWithSpaceFromString:(NSString *)string
                                        frequency:(NSInteger)frequency
                                     prefixString:(NSString *)prefixString;
-(NSString *)replaceStringWithAsterisk:(NSString *)originalStr startLocation:(NSInteger)startLocation length:(NSInteger)length;

+ (BOOL)isContainsTwoEmoji:(NSString *)string;

- (BOOL)isFloatValue;

- (BOOL)isIntValue;

- (BOOL)valitateMoney;

// 判断是否是固话
- (BOOL)checkTelNumber;
//随机字符串
- (NSString *)randomString:(NSInteger)length;
//转拼音
- (NSString *)getPinyin;
@end
